package com.gym.myshop.services;

import com.gym.myshop.entity.Cart;

import java.sql.SQLException;
import java.util.List;

/**
 * @author ming
 * 2021/11/6
 * description:
 */
public interface CartServices {

    /**
     *@author:ming
     *@Date: 2021/11/6
     *@description:添加购物车
     */
    boolean createCart(int pid,int uid);

    /**
     *@author:ming
     *@Date: 2021/11/6
     *@description:使用用户主键查询,用户的购物车数据
     */
    List<Cart> getCarList(int uid);

    /**
     *@author:ming
     *@Date: 2021/11/6
     *@description:删除购物车
     */
    boolean delCart(int uid, Integer pid);

    /**
     *@author:ming
     *@Date: 2021/11/6
     *@description:修改购物车商品数量
     */
    boolean updateCart(int uid, Integer pid, Integer num);
}
